package com.mindskip.xzs.repository;

import com.mindskip.xzs.domain.dto.admin.exampaperanswer.ExamPaperAnswerPageDTO;
import com.mindskip.xzs.domain.dto.student.exampaper.ExamPaperAnswerPageStudentDTO;
import com.mindskip.xzs.domain.entity.ExamPaperAnswer;
import com.mindskip.xzs.domain.entity.TaskExam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ExamPaperAnswerMapper extends BaseMapper<ExamPaperAnswer> {

    // 得到表中所有信息的总数
    Integer selectAllCount();

    List<ExamPaperAnswer> selectByPage(ExamPaperAnswerPageDTO examPaperAnswerPageDTO);

    List<ExamPaperAnswer> selectByTaskExamIdsAndUserId(@Param("taskExamIds") List<Integer> taskExamIds, @Param("userId") Integer userId);

    ExamPaperAnswer selectByPaperIdAndUserId(@Param("paperId") Integer paperId, @Param("userId") Integer userId);

    List<ExamPaperAnswer> selectByPageStudent(ExamPaperAnswerPageStudentDTO examPaperPageDTO);
}
